package com.forekonw.demo5;

import java.util.Scanner;

public class TestEmplyee {
    public static void main(String[] args) {
        Emplyee ee1 = new Emplyee();
        ee1.setNo("123");
        ee1.setSal(123.32);
        ee1.setDept("10");
        ee1.setName("tom");

        Emplyee ee2 = new Emplyee();
        ee2.setNo("p28456");
        ee2.setSal(1321.45);
        ee2.setDept("45");
        ee2.setName("tony");


//        Scanner input = new Scanner(System.in);
//        System.out.println("请输入员工编号，员工姓名，员工部门，工资");
//        String no = input.next();
//        String name = input.next();
//        String dept = input.next();
//        double sal = input.nextDouble();
//        ee.setNo(no);
//        ee.setName(name);
//        ee.setDept(dept);
//        ee.setSal(sal);
//        String no1 = ee.getNo();
//        String name2 = ee.getName();
//        String dept3 =ee.getDept();
//        double sal1 = ee.getSal();


        EmplyeeManager ma = new EmplyeeManager();
        ma.add(ee1);
        ma.add(ee2);
        Emplyee[] cc =  ma.chaxunall();
        System.out.println(cc[0].getName()+cc[0].getNo());
        Emplyee b = ma.chaxun("123");
        System.out.println(b.getName()+b.getDept()+b.getNo()+b.getSal());

    }
}
